# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-zope-i18nmessageid
_pkgname=zope.i18nmessageid
pkgver=6.1.0
pkgrel=2
pkgdesc="Message Identifiers for internationalization"
url="https://github.com/zopefoundation/zope.i18nmessageid"
arch="all"
license="ZPL-2.1"
depends="py3-setuptools"
makedepends="python3-dev py3-gpep517"
checkdepends="py3-nose py3-coverage py3-zope-testrunner"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	gpep517 install-wheel --destdir .testenv --prefix '' .dist/*.whl
	# optimizations don't work(?)
	.testenv/bin/python3 -m nose -e "test_optimizations_available"
}

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
13ca8d6c145ac48217d0f4fae4ae7fa2129a8d37ceeea640dcedca8815587cc9507935f0cc070bf37307cc21269b1a9decd2d18ae1bc79fdb0128f59f7e4b43b  zope.i18nmessageid-6.1.0.tar.gz
"
